<script lang="ts" setup>
// #ifdef MP-WEIXIN
import Text from '/src/components/FoldableText.vue'
// #endif
// #ifdef H5
import Text from '/src/components/FoldableTexth5.vue'
// #endif
import {ref} from 'vue'
import emplty from '@/components/emplty.vue'
import {http} from '@/utlis/http.ts'
import newcomments from '@/components/newcomments.vue'
const comment_list=ref(1)

const pageParam=ref({
      page_num:1,
      page_size:6 ,
      page_count:0
    })
uni.request({
  url: 'comment/users/',
 data:pageParam.value,
  header: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
    'X-Requested-With': 'XMLHttpRequest'
  },
  method: 'POST',
  sslVerify: true,
  success: ({ data, statusCode, header }) => {
    console.log('mucomment',data)
    if(statusCode!=404){
      comment_list.value=data.list
      pageParam.value.page_count = data.count
    }
  },
  fail: (error) => {}
})

  </script>
<template  >
        <emplty v-if="!comment_list.length"></emplty>
        <newcomments v-else :comment_list = comment_list></newcomments>
</template>
      
<style lang="scss">
page{
  background-color: rgba(0,0,0,.03);
}
      </style>
      